/* Layout */
import Layout from '../views/layout/Layout';

const _import = require(`./_import_${process.env.NODE_ENV}`);
const memberRoutes = [
  {
    path: '/member',
    component: Layout,
    redirect: '/member/member-list',
    name: 'member',
    meta: {
      title: '会员管理',
      icon: 'user',
      roles: [],
    },
    children: [
      {
        path: 'member-list',
        name: 'member-list',
        component: _import('member/list/index'),
        meta: {
          title: '会员列表',
          roles: ['batch-lock'/* 批量锁定/解锁 */, 'lock'/* 单个锁定/解锁 */, 'edit-btn'/* 编辑资料 */, 'detail-btn'/* 会员账户 */,
            'agency'/* 所属代理 */, 'backup'/* 备注 */, 'edit-member-info'/* 更改会员资料 */, 'reset-name-bank'/* 重置姓名/银行卡 */,
            'member-info'/* 会员信息 */, 'trade-info'/* 交易信息 */, 'login-log'/* 登陆日志 */, 'arbitrage-query'/* 套利查询 */,
            'bank-info'/* 银行信息 */, 'operation-log'/* 操作记录 */, 'account-limit'/* 账户限制 */, 'address'/* 我的地址 */,
            'recycle-transfer'/* 一键回收/转入 */, 'sync-balance'/* 同步余额 */, 'export'/* 导出 */, 'export-user-info'/* 导出会员交易信息 */,
            'phone-show-partial'/* 手机号部分显示 */, 'phone-show-all'/* 手机号全部显示 */, 'email-show-partial'/* 邮箱部分显示 */,
            'email-show-all'/* 邮箱全部显示 */, 'adjust-running-water'/* 调整流水 */, 'remove-running-water'/* 清除流水 */,
            'recover-running-water'/* 恢复流水 */, 'empty-running-water'/* 流水清零 */, 'batch-modify-level'/* 批量修改层级 */, 'modify-level'/* 修改层级 */,
            'sync-member-user'/* 同步 */,'batch-update-vip'/* 批量修改VIP */, 'batch-unlock-vip'/* 批量解鎖VIP */, 'update-vip'/* 修改VIP */], // or you can only set roles in sub nav
          // noCache: true
        },
      },
      {
        path: 'member-operate-audit',
        name: 'member-operate-audit',
        component: _import('member/updateAudit/index'),
        meta: {
          title: '操作审核',
          roles: ['first-audit', 'second-audit', 'phone-show-partial'/* 手机号部分显示 */, 'phone-show-all'/* 手机号全部显示 */,
            'email-show-partial'/* 邮箱部分显示 */, 'email-show-all'], // or you can only set roles in sub nav
        },
      },
      {
        path: 'member-chatRoom',
        name: 'member-chatRoom',
        component: _import('member/chartRoom/index'),
        meta: {
          title: '聊天管理',
          roles: ['chatRoom-processed'/* 待处理列表 */, 'chatRoom-processed-detail'/* 查看举报详情 */, 'chatRoom-processed-ignore'/* 忽略 */,
            'chatRoom-processed-ban'/* 禁言 */, 'chatRoom-report-log'/* 举报记录 */, 'chatRoom-report-ban'/* 禁言 */, 'chatRoom-banned-table'/* 禁言用户列表 */,
            'chatRoom-banned-table-detail'/* 查看举报详情 */, 'chatRoom-banned-table-unban'/* 禁言用户列表 */, 'chatRoom-operating-log'/* 操作记录 */, 'chatRoom-operating-detail'/* 操作记录详情 */,
            'chatRoom-banned-set'/* 禁言通用设置 */, 'chatRoom-bannedType-save'/* 禁言类型通用设置 */, 'chatRoom-bannedTime-save'], // or you can only set roles in sub nav
        },
      },
      {
        path: 'member-lock-logs',
        name: 'member-lock-logs',
        component: _import('member/lockLogs/lockLogs'),
        meta: {
          title: '异常记录',
          roles: [], // or you can only set roles in sub nav
        },
      },
      {
        path: 'member-phone-email-record',
        name: 'member-phone-email-record',
        component: _import('member/phoneAndEmailRecord/index'),
        meta: {
          title: '手机邮箱记录',
          roles: ['phone-show-partial'/* 手机号部分显示 */, 'phone-show-all'/* 手机号全部显示 */, 'email-show-partial'/* 邮箱部分显示 */,
            'email-show-all'], // or you can only set roles in sub nav
        },
      },
      {
        path: 'member-luck-unluck-record',
        name: 'member-luck-unluck-record',
        component: _import('member/vipLuckRecord/index'),
        meta: {
          title: 'VIP锁定解锁记录',
          roles: [], // or you can only set roles in sub nav
        },
      },
      // {
      //   path: 'member-group',
      //   name: 'member-group',
      //   component: _import('member/lockLogs/lockLogs'),
      //   meta: {
      //     title: '群组管理',
      //     roles: [] // or you can only set roles in sub nav
      //   }
      // }
    ],
  },
];

export default memberRoutes;
